public class SimpleDateFormat1 {
    public static void main(String[] args) {
        java.util.Date date = new java.util.Date();
        String strDateFormat = "yyyy-MM-dd HH:mm:ss";
        java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(strDateFormat);
        System.out.println(sdf.format(date));
    }
}
